home *** CD-ROM | disk | FTP | other *** search
- /*
- * Test application for CForms.
- * @(#) input.frm,v 1.4 1993/05/10 22:52:00 lasse Exp
- */
-
- Viewport view {
- Pos 0,0;
- Size 80, 23;
- }
-
- CCode {
- extern int cur_row;
- }
-
- Event Key DOWN { fld_move(fld_down(NULL)); }
- Event Key UP { fld_move(fld_up(NULL)); }
- Event Key CR { fld_move(fld_next(NULL)); }
- Event Key TAB { fld_move(fld_next(NULL)); }
- Event Key HELP { message("You're using CForms"); }
- Event Key ESC { pic_leave(); }
- Event Key F8 { pic_leave(); }
-
- Picture Welcome Viewport View {
-
- Event Draw {
- fld_set(field("name"), fld_get(field("list:name%d", cur_row)));
- fld_set(field("adress"), fld_get(field("list:adress%d", cur_row)));
- }
-
- Event Key ESC { pic_leave(); message("Canceled"); }
-
- Event Key F1 {
- fld_set(field("list:name%d", cur_row), fld_get(field("name")));
- fld_set(field("list:adress%d", cur_row), fld_get(field("adress")));
- message("Inserted");
- pic_leave();
- }
-
- Literal 25, 1, "Person registration";
- Literal +0, +1, "-------------------";
-
- Field name {
- Pos 20, 5;
- Type Char(20);
- LValue "Name: ";
- Uppercase;
- }
-
- Field adress {
- Pos 20, 7;
- Type Char(20);
- LValue "Adress: ";
- Uppercase;
- }
-
- Literal Center, Max, "(F1 - Update) (ESC - Leave)";
- }
-